package com.kwlt.smc.util;

import org.springframework.beans.BeansException;

import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;



@Component
public class InitBean implements BeanPostProcessor{

	/* (non-Javadoc)
	 * @see org.springframework.beans.factory.config.BeanPostProcessor#postProcessAfterInitialization(java.lang.Object, java.lang.String)
	 */
	public Object postProcessAfterInitialization(Object bean, String beanName)
			throws BeansException {
		if(bean instanceof CacheMap){
			((CacheMap)bean).setPhoneThemRoughlyMap();
			((CacheMap)bean).setKeyword();
			((CacheMap)bean).setUserMap();
			((CacheMap)bean).setChannelList();
		}
		return bean;
	}

	public Object postProcessBeforeInitialization(Object bean, String beanName)
			throws BeansException {
		
		return bean;
	}

}
